var common = require("../../common/common.js").common;

Component({
    properties: {
        list: {
            type: Object
        },
        from: {
            type: String,
            default: "index"
        },
        nickname: {
            type: String,
            default: ""
        },
        leaderName: {
            type: String,
            default: ""
        },
        colorMain: {
            type: String,
            default: ""
        }
    },
    data: {},
    methods: {
        goToDetails: function(e) {
            common.request({
                endpoint: "group-solit/add-scan",
                method: "post",
                data: {
                    group_id: e.currentTarget.dataset.id
                },
                success: res => {},
                fail() {}
            });
            wx.navigateTo({
                url: e.currentTarget.dataset.url
            });
        },
        showShare: function(e) {
            this.triggerEvent("confirm", {
                value: e
            }, {});
        }
    }
});